using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class rotateAroundpartens : MonoBehaviour
{
    public float speed = 1.0f;
    public float offset = 0.0f;
    public float center_x;
    public float center_y;
    public float x_axes = 1.0f;
    public float y_axes = 1.0f;

    // Update is called once per frame
    void Update()
    {
        offset += Time.deltaTime * speed;
        if (offset >= 360.0f) offset %= 360;
        float x =  center_x+x_axes * Mathf.Cos(offset);
        float y = center_y+y_axes * Mathf.Sin(offset);
        this.transform.position = new Vector3(x, y, 0.0f);
    }
}
